export default function(data:string|number|null|undefined,fuhao:null|string=null){
    if(!data){
        return ""
    }else{
        let shijian = 0
        if(Number.isNaN(data)){
            shijian = parseInt(data as string)
        }else{
            shijian = data as number
        }

        let strTime = new Date(shijian).toLocaleString("zh", {
            year: 'numeric',
            month: '2-digit',       // 显示两位
            day: '2-digit',         // 显示两位
            hour12: false,
            hour: '2-digit',
            minute: '2-digit',
            second: '2-digit'
        })
        if(fuhao){
            strTime = strTime.replace(/\//g,fuhao)
        }
        return strTime
    }
}


